import VueRouter from 'vue-router'

//导入路由组件
import homeContainer from './components/tabber/homeContainer.vue'
import memberContainer from './components/tabber/memberContainer.vue'
import shopContainer from './components/tabber/shopContainer.vue'
import searchContainer from './components/tabber/searchContainer.vue'


import newsList from './components/news/newslist.vue'
import newsinfo from './components/news/newsinfo.vue'

import photolist from './components/photo/photolist.vue'
import photoinfo from './components/photo/photoinfo.vue'

import goodslist from './components/goods/goodslist.vue'
import goodsinfo from './components/goods/goodsinfo.vue'
import goodsdesc from './components/goods/goodsdesc.vue'
import goodscomment from './components/goods/goodscomment.vue'

var router = new VueRouter({
    routes:[
        {path : '/',redirect:'/home'},
        {path : '/home',component : homeContainer},
        {path : '/member',component : memberContainer},
        {path : '/shop',component:shopContainer},
        {path : '/search',component: searchContainer},
        {path : '/home/newlist',component : newsList},
        {path : '/home/newsinfo/:id',component : newsinfo},
        {path : '/home/photolist', component : photolist},
        {path : '/home/photoinfo/:id', component : photoinfo},
        {path : '/home/goodslist/',component : goodslist},
        {path : '/home/goodsinfo/:id', component : goodsinfo, name : 'myinfo'},
        {path : '/home/goodsdesc/:id',component : goodsdesc, name:'goodsdesc'},
        {path : '/home/goodscomment/:id',component : goodscomment, name:'goodscomment'},
        
    ],
    linkActiveClass : 'mui-active'  //默认类为router-link-active
})

export default router